#ifndef PIT_H_
#define PIT_H_

#include <types.h>

#define PIT_INTERNAL_FREQ 1193182
#define PIT_CHANNEL0 0x40
#define PIT_CHANNEL1 0x41
#define PIT_CHANNEL2 0x42
#define PIT_MODE 0x43

#define PIT_ERR_NOALLOC 1

extern dword pit_handle;

int detect_pit(void);
int init_pit(void);
int start_pit(void);
int stop_pit(void);
int pit_isr(void);
void pit_set_frequency(word freq);

#endif /*PIT_H_*/
